package com.gqz.equip.api;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gqz.common.core.domain.R;
import com.gqz.common.core.domain.RequestForm;
import com.gqz.equip.vo.TEnWzCrkOrderListVo;
import com.gqz.equip.vo.TEnWzCrkOrderVo;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;


/**
 * 新能源-物资-出入库工单表
 *
 * @author gqz20
 * @date 2023/02/25
 */
@RequestMapping("/t-en-wz-crk-order")
public interface TEnWzCrkOrderApi {
    @PostMapping("/{id}")
    public R<List<TEnWzCrkOrderVo>> getById(
            @PathVariable("id") String id);

    @PostMapping("/page")
    public R<Page<TEnWzCrkOrderVo>> page(
            @RequestBody RequestForm<TEnWzCrkOrderVo> requestForm);

    /**
     * 出入库审核页面分页查询
     *
     * @param requestForm 申请表
     * @return {@link R}<{@link Page}<{@link TEnWzCrkOrderVo}>>
     */
    @PostMapping("/shPage")
    public R<Page<TEnWzCrkOrderVo>> shPage(
            @RequestBody RequestForm<TEnWzCrkOrderVo> requestForm);

    @PostMapping("/count")
    public R<Long> count(
            @RequestBody RequestForm<TEnWzCrkOrderVo> requestForm);

    @PostMapping("/insert")
    public R<Integer> insert(
            @RequestBody TEnWzCrkOrderListVo vos);

    @PostMapping("/update")
    public R<Integer> update(
            @RequestBody TEnWzCrkOrderListVo vos);


    /**
     * 获取单据编号（新增）
     *
     * @return {@link R}<{@link Object}>
     */
    @PostMapping("/getDjbh")
    public R<Object> getDjbh();

    /**
     * 按ID删除
     *
     * @param ids
     * @return {@link R}<{@link Integer}>
     */
    @PostMapping("/deleteByIds")
    public R<Integer> deleteByIds(
            @RequestBody String[] ids);

    /**
     * 出入库工单表-提交审核单据
     *
     * @param ids
     * @return {@link R}<{@link Integer}>
     */
    @PostMapping("/submitShByIds")
    public R<Integer> submitShByIds(
            @RequestBody String[] ids);

    /**
     * 出入库工单表-单据审核
     *
     * @param vos 你
     * @return {@link R}<{@link Integer}>
     */
    @PostMapping("/shDj")
    public R<Integer> shDj(
            @RequestBody TEnWzCrkOrderVo vos);


}
